import { createRouter, createWebHistory } from 'vue-router'
import VocabularyView from '../views/english/VocabularyView.vue'
import AIExerciseView from '@/views/english/AIExerciseView.vue'
import AIReadingView from '@/views/english/AIReadingView.vue'
import AITranslationView from '@/views/english/AITranslationView.vue'
import QaView from '../views/qa/QaView.vue'
import QaViewT from '../views/qa/teacher/QaViewT.vue'
import ProfileView from '../views/profile/ProfileView.vue'
import ProfileViewT from '../views/profile/teacher/ProfileViewT.vue'
import PoliticsView from '@/views/politics/PoliticsView.vue'
import PoliticsRealPracticeView from '@/views/politics/PoliticsRealPracticeView.vue'
import PoliticsWeekTestPracticeView from '@/views/politics/weekTest/PoliticsWeekTestPracticeView.vue'
import PoliticsRealExplanationView from '@/views/politics/PoliticsRealExplanationView.vue'
import PoliticsAIExplanationView from '@/views/politics/PoliticsAIExplanationView.vue'
import PoliticsWrongExplanationView from '@/views/politics/PoliticsWrongExplanationView.vue'
import PoliticsSpecialExplanationView from '@/views/politics/PoliticsSpecialExplanationView.vue'
import MathRealView from '@/views/math/MathRealView.vue'
import MathView from '@/views/math/MathView.vue'
import MathWrongView from '@/views/math/MathWrongView.vue'
import EnglishView from '@/views/english/EnglishView.vue'
import NotificationDetailView from '@/views/common/NotificationDetailView.vue'
import NotificationDetailViewT from '@/views/common/teacher/NotificationDetailViewT.vue'
import BasicInfoView from '@/views/auth/BasicInfoView.vue'
import GroupManagementView from '@/views/group/GroupManagementView.vue'
import StudentManagementView from '@/views/student/StudentManagementView.vue'
import GroupAddView from '@/views/group/GroupAddView.vue'
import GroupEditDetailView from '@/views/group/GroupEditDetailView.vue'
import NotificationAddViewT from '@/views/common/teacher/NotificationAddViewT.vue'
import ForgotPasswordView from '@/views/auth/ForgotPasswordView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/auth/LoginView.vue')
  },
  {
    path: '/forgot-password',
    name: 'ForgotPassword',
    component: ForgotPasswordView
  },
  {
    path: '/english/exam',
    name: 'EnglishExam',
    component: () => import('@/views/english/ExamView.vue')
  },
  {
    path: '/english/reading-text',
    name: 'EnglishReadingText',
    component: () => import('@/views/english/ReadingTextView.vue')
  },
  {
    path: '/english/weekTestExam',
    name: 'ExamViewWeekTest',
    component: () => import('@/views/english/weekTest/EnglishExamWeekTest.vue')
  },
  {
    path: '/english/weekTest/reading-text',
    name: 'EnglishReadingWeekTestText',
    component: () => import('@/views/english/weekTest/ReadingTextView.vue')
  },
  {
    path: '/english/reading-analysis',
    name: 'EnglishReadingAnalysis',
    component: () => import('@/views/english/ReadingAnalysisView.vue')
  },
  {
    path: '/english/translation',
    name: 'translation',
    component: () => import('../views/english/TranslationView.vue'),
    meta: {
      title: '英语翻译练习'
    }
  },
  {
    path: '/english/weekTest/translation',
    name: 'translationWeekTest',
    component: () => import('../views/english/weekTest/TranslationView.vue'),
    meta: {
      title: '英语翻译周测'
    }
  },
  {
    path: '/english/cloze',
    name: 'EnglishCloze',
    component: () => import('@/views/english/ClozeView.vue'),
    meta: {
      title: '完形填空'
    }
  },
  {
    path: '/english/weeKTest/cloze',
    name: 'EnglishClozeWeekTest',
    component: () => import('@/views/english/weekTest/ClozeView.vue'),
    meta: {
      title: '完形填空周测'
    }
  },
  {
    path: '/english/new-type',
    name: 'EnglishNewType',
    component: () => import('@/views/english/NewTypeView.vue'),
    meta: {
      title: '新题型'
    }
  },
  {
    path: '/english/newtype-explanation',
    name: 'NewTypeExplanation',
    component: () => import('@/views/english/NewTypeExplanationView.vue')
  },
  {
    path: '/english/weekTest/new-type',
    name: 'EnglishNewTypeWeekTest',
    component: () => import('@/views/english/weekTest/NewTypeView.vue'),
    meta: {
      title: '七选五周测'
    }
  },
  {
    path: '/english/cloze-explanation',
    name: 'clozeExplanation',
    component: () => import('../views/english/ClozeExplanationView.vue'),
    meta: {
      title: '完形填空解析'
    }
  },
  {
    path: '/english/small-writing',
    name: 'EnglishSmallWriting',
    component: () => import('@/views/english/SmallWritingView.vue')
  },
  {
    path: '/english/weekTest/small-writing',
    name: 'EnglishSmallWritingWeekTest',
    component: () => import('@/views/english/weekTest/SmallWritingView.vue')
  },
  {
    path: '/english/large-writing',
    name: 'EnglishLargeWriting',
    component: () => import('@/views/english/LargeWritingView.vue')
  },
  {
    path: '/english/weekTest/large-writing',
    name: 'EnglishLargeWritingWeekTest',
    component: () => import('@/views/english/weekTest/LargeWritingView.vue')
  },
  {
    path: '/english/vocabulary',
    name: 'vocabulary',
    component: VocabularyView
  },
  {
    path: '/english/ai-exercise',
    name: 'AIExercise',
    component: AIExerciseView
  },
  {
    path: '/english/ai-reading',
    name: 'AIReading',
    component: AIReadingView
  },
  {
    path: '/english/ai-translation',
    name: 'AITranslation',
    component: AITranslationView
  },
  {
    path: '/notification/add-notification-t',
    name: 'NotificationAddViewT',
    component: NotificationAddViewT
  },
  {
    path: '/english/ai-reading-analysis',
    name: 'AIReadingAnalysis',
    component: () => import('@/views/english/AIReadingAnalysisView.vue')
  },
  {
    path: '/english/ai-translation-analysis',
    name: 'AITranslationAnalysis',
    component: () => import('@/views/english/AITranslationAnalysisView.vue')
  },
  {
    path: '/english/sentence-practice',
    name: 'SentencePractice',
    component: () => import('@/views/english/SentencePracticeView.vue')
  },
  {
    path: '/routes',
    name: 'Routes',
    component: () => import('@/views/RoutesView.vue')
  },
  {
    path: '/qa',
    name: 'qa',
    component: QaView
  },
  {
    path: '/qaT',
    name: 'qaT',
    component: QaViewT
  },
  {
    path: '/qa-detail/:id/:subjectId',
    name: 'qa-detail',
    component: () => import('../views/qa/QaDetailView.vue')
  },
  {
    path: '/qa-detail-t/:id/:subjectId',
    name: 'qa-detail-t',
    component: () => import('../views/qa/teacher/QaDetailViewT.vue')
  },
  {
    path: '/qa-add',
    name: 'qa-add',
    component: () => import('../views/qa/QaAddView.vue')
  },
  {
    path: '/qa-add-t',
    name: 'qa-add-t',
    component: () => import('../views/qa/teacher/QaAddViewT.vue')
  },
  {
    path: '/groups-add',
    name: 'groups-add',
    component: GroupAddView
  },
  {
    path: '/groups',
    name: 'groups',
    component: GroupManagementView
  },
  {
    path: '/groups-edit/:groupId',
    name: 'groups-edit',
    component: GroupEditDetailView
  },
  {
    path: '/students',
    name: 'students',
    component: StudentManagementView
  },
  {
    path: '/students-report/:userId',
    name: 'students-report',
    component: () => import('../views/profile/teacher/StudyReportViewT.vue')
  },
  {
    path: '/profile',
    name: 'profile',
    component: ProfileView
  },
  {
    path: '/profileT',
    name: 'profileT',
    component: ProfileViewT
  },
  {
    path: '/profile-edit',
    name: 'profile-edit',
    component: () => import('../views/profile/ProfileEditView.vue')
  },
  {
    path: '/profile-edit-t',
    name: 'profile-edit-t',
    component: () => import('../views/profile/teacher/ProfileEditViewT.vue')
  },
  {
    path: '/study-statistics',
    name: 'study-statistics',
    component: () => import('../views/profile/StudyStatisticsView.vue')
  },
  {
    path: '/study-report',
    name: 'study-report',
    component: () => import('../views/profile/StudyReportView.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/auth/RegisterView.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/auth/LoginView.vue')
  },
  {
    path: '/basic-info',
    name: 'BasicInfoView',
    component: BasicInfoView
  },
  {
    path: '/politics',
    name: 'politics',
    component: PoliticsView
  },
  {
    path: '/politics/real',
    name: 'politics-real',
    component: () => import('@/views/politics/PoliticsRealView.vue')
  },
  {
    path: '/politics/special',
    name: 'politics-special',
    component: () => import('@/views/politics/PoliticsSpecialView.vue')
  },
  {
    path: '/politics/wrong',
    name: 'politics-wrong',
    component: () => import('@/views/politics/PoliticsWrongView.vue')
  },
  {
    path: '/politics/ai',
    name: 'politics-ai',
    component: () => import('@/views/politics/PoliticsAIView.vue')
  },
  {
    path: '/politics/real/practice',
    name: 'politics-real-practice',
    component: PoliticsRealPracticeView
  },
  {
    path: '/politics/weekTest/practice',
    name: 'politics-weekTest-practice',
    component: PoliticsWeekTestPracticeView
  },
  {
    path: '/politics/real/explanation',
    name: 'politics-real-explanation',
    component: PoliticsRealExplanationView
  },
  {
    path: '/politics/ai/explanation',
    name: 'politics-ai-explanation',
    component: PoliticsAIExplanationView
  },
  {
    path: '/politics/wrong/explanation',
    name: 'politics-wrong-explanation',
    component: PoliticsWrongExplanationView
  },
  {
    path: '/politics/special/explanation',
    name: 'politics-special-explanation',
    component: PoliticsSpecialExplanationView
  },
  {
    path: '/politics/special/practice',
    name: 'politics-special-practice',
    component: () => import('@/views/politics/PoliticsSpecialPracticeView.vue')
  },
  {
    path: '/politics/ai/practice',
    name: 'politics-ai-practice',
    component: () => import('@/views/politics/PoliticsAIPracticeView.vue')
  },
  {
    path: '/math/real',
    name: 'math-real',
    component: MathRealView
  },
  {
    path: '/math',
    name: 'math',
    component: MathView
  },
  {
    path: '/math/real/practice',
    name: 'math-real-practice',
    component: () => import('@/views/math/MathRealPracticeView.vue')
  },
  {
    path: '/math/wrong',
    name: 'math-wrong',
    component: MathWrongView
  },
  {
    path: '/english',
    name: 'english',
    component: EnglishView
  },
  {
    path:'/vocabulary',
    name: 'Vocabulary',
    component:()=>import('@/views/english/VocabularyView.vue')
  },
  {
    path: '/notification',
    name: 'Notification',
    component: () => import('@/views/common/NotificationView.vue')
  },
  {
    path: '/notificationT',
    name: 'notificationT',
    component: () => import('@/views/common/teacher/NotificationViewT.vue')
  },
  {
    path: '/notification/:id',
    name: 'NotificationDetail',
    component: NotificationDetailView
  },
  {
    path: '/notificationT/:id',
    name: 'NotificationDetailT',
    component: NotificationDetailViewT
  },
  {
    path: '/useragreement',
    name: 'UserAgreement',
    component: () => import('@/views/auth/UserAgreementView.vue')
  },
  {
    path: '/privacypolicy',
    name: 'PrivacyPolicyView',
    component: () => import('@/views/auth/PrivacyPolicyView.vue')
  },

]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 